<?php
namespace app\api\controller\v1;
use think\admin\Controller;
use think\Response;
use app\data\model\DataBanner;
use app\data\model\DataPages;
/**
 * 其他数据接口
 * @class Others
 * @package app\api\controller\v1
 *
 */
class Others extends Controller
{

    //轮播
    public function banner()
    {
        $res = DataBanner::mk()->where(['is_deleted'=>0])->order('sort asc,id asc')->select();
        $this->success('success',$res);
    }
    //单页
    public function page(){
        $id = input('get.id/d');
        $res = DataPages::mk()->where(['is_deleted'=>0,'id'=>$id])->find();
        $this->success('success',$res);
    }
    public function global_data(){
        $setting = sysconf('about.');
        $this->success('success',$setting);
    }
}
